package com.springcloud.hystrixdemo.service.impl

import com.springcloud.hystrixdemo.service.FeignService
import org.springframework.stereotype.Component
import org.springframework.web.bind.annotation.RequestParam

/*
   该类提供FeignService的降级处理
   该类能捕获并处理Feign方法调用过程中抛出的所有非HystrixBadRequestException异常
 */
@Component
class FeignServiceFallback implements FeignService{
    @Override
    String msg(@RequestParam('wd') String wd) {
        "${wd}处理失败"
    }
}
